使用beyond compare比较git版本差异的配置和使用方法 您所在的位置:网站首页 beyond compare比较两个excel 使用beyond compare比较git版本差异的配置和使用方法

使用beyond compare比较git版本差异的配置和使用方法

2024-01-11 00:47| 来源: 网络整理| 查看: 265

首先输入下述指令查看自己的git版本支持哪些工具

git difftool --tool-help git mergetool --tool-help

bc3,bc4,代表的就是beyond compare,如果没有的话就升级git版本吧

git bash中输入下述指令,换成你自己的文件路径,注意是BComp.exe不是BCompare.exe

git config --global diff.tool bc4 git config --global difftool.bc4.cmd '"E:\Program Files\Beyond Compare\BComp.exe" "$LOCAL" "$REMOTE"' git config --global merge.tool bc4 git config --global mergetool.bc4.cmd '"E:\Program Files\Beyond Compare\BComp.exe" "$LOCAL" "$REMOTE"'

之后只需要在gitbash中输入git difftool,就能自动打开beyond compare显示差异的文件

git difftool

但假如你文件夹里代码很多的话,beyond compare不会一起给你打开,而是一个一个打开,关掉一个,他再给你弹出来一个窗口,非常麻烦

git difftool --dir-diff

只需输入上述指令,就会比较整个文件夹的差异,哪些文件做过更改就会标红显示出来

 这时再想看哪个文件的差异,直接双击就会新建一个标签页显示



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有